﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WqHtmlAnchorSpider.Properties;

namespace WqHtmlAnchorSpider
{
    public class AnchorListHtmlWriter
    {
        public static void WriteHtml(List<AnchorObj> anchorObjs, string savePath)
        {
            String str = Resources.htmlbegin;
            foreach (var anchorObj in anchorObjs)
            {
                str += anchorObj.GetHtmlNode();
            }

            str += Resources.htmlend;
            File.WriteAllText(savePath, str);
        }
    }
}